|
Mobile
- ExecutorBehaviour.class
- MobileAgent.class
This is an example of mobile agent.
.
- CounterBehaviour.class
The behaviour uses two resources, in particular
the counter cnt and the flag cntEnabled, of the agent object. It
prints its value, increments by one,blocks for two seconds, and repeats
forever.
This is the main behaviour of the Agent.
It serves all the received messages. In particular,the following
expressions are accepted as content of "request" messages:
- (move <destination>)
to move the Agent to another container. Example: (move Front-End) or (move
Container-1)
- (exit) to request
the agent to exit
- (stop) to stop the
counter
- (continue) to continue
counting
This is an example of mobile agent. This
class contains the two resources used by the agent behaviours: the counter
cnt and the flag cntEnabled. At the setup it adds two behaviours to serve
the incoming messages and to increment the counter. In particular, notice
the usage of the two methods beforeMove() and afterMove() to execute some
application-specific tasks just before and just after the agent migration
takes effect.
JADE is a trademark of CSELT. JADE has been developed jointly by CSELT and the Computer Engineering Group of the University of Parma